#ifndef __GOOGLE_CONTACT_INCLUDE__
#define __GOOGLE_CONTACT_INCLUDE__

#include <map>

struct Phone {
	tstring _etag;

	tstring _number;
	tstring _label;
};

struct Person {
	tstring _etag;

	tstring _frist;
	tstring _last;
	tstring _fullname;
	tstring _organization;
	tstring _note;
	tstring _birthday;
	std::map<tstring, Phone> _phones;

	bool AddPhone(tstring number, tstring label);
	bool DelPhone(tstring number);
	bool HasPhone(tstring number);
};

struct ContactData {
	std::map<tstring, Person> _persons;

	bool AddPerson(tstring fullname);
	bool DelPerson(tstring fullname);
	bool HasPerson(tstring fullname);
	Person& GetPerson(tstring fullname);
};

class CGoogleContact : public CGoogleService
{
public:
	CGoogleContact(LPCTSTR pSource);

	bool GetContacts(ContactData& Data);

};

#endif
